package rs.frenjoynet.music.core;

import rs.frenjoynet.core.core.db.DBBroker;
import rs.frenjoynet.core.core.db.MySqlHibDBBrokerImpl;
import rs.frenjoynet.music.core.entity.primerEntiteta;
import org.hibernate.cfg.Configuration;
import org.hibernate.SessionFactory;

/**
 * Created by IntelliJ IDEA.
 * User: ppopovic
 * Date: Mar 4, 2010
 * Time: 1:33:41 PM
 * To change this template use File | Settings | File Templates.
 */
public class Test
{
	public static void main(String[] varg)
	{
		String configurationPath = "rs/frenjoynet/music/core/cfg/musHibernate.cfg.xml";
		SessionFactory sessionFactory = new Configuration().configure(configurationPath).buildSessionFactory();

		DBBroker dbBroker = new MySqlHibDBBrokerImpl(sessionFactory);

		primerEntiteta us = new primerEntiteta("petar popovic");

		dbBroker.insert(primerEntiteta.class, us);
	}
}
